package com.csi.sai.utilities.templates.selects;

import java.sql.ResultSet;
import java.sql.SQLException;

public class ComboEstatus implements ComponentTemplate {
	
	private String htmlCode;
	
	@Override
	public void setRS(ResultSet rs) throws SQLException {
		StringBuffer sb = new StringBuffer();
		sb.append("<select id=\"gComboEstatus\" class=\"combo\">");
		sb.append("<option id=\"0\">Selecciona</option>");
		while(rs.next()) {
			sb.append("<option id=\""+rs.getString(1)+"\">"+rs.getString(1)+"</option>");
		}
		sb.append("</select>");
		htmlCode = sb.toString();
	}

	@Override
	public String getComponentGeneric() {
		return htmlCode;
	}

	@Override
	public void setRS(ResultSet rs, int idSelected) throws SQLException {
		// TODO Auto-generated method stub
		
	}

}
